package de.andreavicentini.teatralia.pages.events;

import java.util.Locale;

import org.magiclabs.htmlx.ProgrammaticTextStructure;
import org.magiclabs.htmlx.TextStructure;


public class FotosLink {

	private enum Keys implements TextStructure.TextKey {
		photos;
	}
	
	private final static TextStructure TOKENS = new ProgrammaticTextStructure() {{
		this.add(Keys.photos)
			.add(Locale.GERMAN, "Fotos")
			.add(Locale.ITALIAN, "foto")
			;
	}};
	
	private final String url;
	public FotosLink(String url) {
		this.url = url;
	}
	
	@Override
	public String toString() {
		if (this.url == null) return "";
		return "<a class=\"foto\" target=_new href=\"" + this.url + "\"><b>[&nbsp;&nbsp;" + TOKENS.get(Keys.photos) + "&nbsp;&nbsp;]</b></a>";
	}
}
